Fixes script that perform change password on hosts#6783
Fixes script that perform change password on hosts#6783DaanHoogland merged 4 commits intoapache:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6783 +/- ##
============================================
+ Coverage 10.52% 10.87% +0.34%
- Complexity 6784 7115 +331
============================================
Files 2464 2485 +21
Lines 243988 245507 +1519
Branches 38185 38334 +149
============================================
+ Hits 25690 26695 +1005
- Misses 215065 215543 +478
- Partials 3233 3269 +36
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan package |
|
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4380 |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4421 |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✔️ suse15. SL-JID 4433 |
|
Packaging result: ✖️ el7 ✔️ el8 ✖️ debian ✖️ suse15. SL-JID 4445 |
|
Packaging result: ✖️ el7 ✔️ el8 ✖️ debian ✖️ suse15. SL-JID 4451 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4455 |
|
@blueorangutan test matrix |
|
@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-5122)
|
|
Trillian test result (tid-5124)
|
|
Trillian test result (tid-5123)
|
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-5144)
|
|
I run this script on a ubuntu 22.04 host, the password has been changed successfully, but the exit code is 1 still needs some changes |
I ran the same test with Ubuntu versions 20.04 and 22.04. However, the result in my environment was different from what was reported. On ubuntu 20.04: On ubuntu 22.04: can you recheck? |
@RodrigoDLopez |
remove unused variable
| if [[ $(echo $?) -eq 0 ]]; then | ||
| exit 0 | ||
| else | ||
| exit 1 | ||
| fi No newline at end of file | ||
| fi |
There was a problem hiding this comment.
I don´t mind this part, but just letting the script exit will have all but the same effect; $? will be the exit code.
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4739 |
|
Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✖️ suse15. SL-JID 4751 |
|
Packaging result: ✔️ el7 ✔️ el8 ✖️ debian ✔️ suse15. SL-JID 4753 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4755 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-5397) |
|
Trillian Build Failed (tid-5406) |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4796 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
weizhouapache
left a comment
There was a problem hiding this comment.
code lgtm
better to manually test this on EL7/EL8 (and similar)/ubuntu20/ubuntu22
|
Trillian test result (tid-5419)
|
|
good point @weizhouapache |
|
@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-5472)
|
|
Trillian test result (tid-5471)
|
|
Trillian test result (tid-5473)
|
|
doing some extra manual tests on assorted environments, @RodrigoDLopez . otherwise ready to merge
|
@weizhouapache @RodrigoDLopez , only the vmware version failed. I am now trying a centos7 with vmware to eliminate the alma8 factor. |
|
ok, the failures have nothing to do with this code. I also had not understood the functionality completely. redoing some tests. |
|
tested good on xen and kvm, not supported on vmware: merging |
Description
When adding a KVM host via ACS UI, it is necessary to provide a username and password for ACS to connect via SSH to the host. When using the
updateHostPasswordAPI, ACS updates the password in the metadata. When the update_passwd_on_host parameter is specified as true, ACS sends a command to the host that causes it to run a script to change the user's password on the host.During some internal tests, it was observed that the script was not changing the password and returned an error. Adjustments were made to this script to make it work again.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
After executing the
updateHostPasswordAPI, an attempt was made to access the host via ssh using the user and the new password as a parameter. The expected result is that the password for that user has been updated, and this was the result observed during the tests.